﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.BusinessRules
{
    public class DBOption : BusinessObject
    {
        public DBOption()
        {
            AddRule(new ValidateRequired("OptionID"));
            AddRule(new ValidateLength("OptionID", 0, 50));

            AddRule(new ValidateRequired("OptionValue"));
            AddRule(new ValidateLength("OptionValue", 0, 50));

            AddRule(new ValidateRequired("ValueType"));
        }

        public DBOption(string optionID, string optionValue, int valueType, string description)
            : this()
        {
            OptionID = optionID;
            OptionValue = optionValue;
            ValueType = valueType;
            Description = description;
        }

        public string OptionID { get; set; }

        public string OptionValue { get; set; }

        public int ValueType { get; set; }

        public string Description { get; set; }
    }
}
